import http from '@/utils/request'
//获取用户的角色列表
export async function getRoleApi(parm){
  return await http.getRestApi("/role",parm)
}
//获取角色列表
export async function getRoleListApi(parm){
  return await http.getRestApi("/role/list",parm)
}
//新增角色
export async function addRoleApi(parm){
  return await http.post("/role",parm)
}
//编辑角色
export async function editRoleApi(parm){
  return await http.put("/role",parm)
}
//修改状态
export async function editRoleStatusApi(parm) {
  return await http.put("/role/status", parm)
}
//删除角色
export async function deleteRoleApi(parm){
  return await http.delete("/role",parm)
}
//获取分配权限树数据
export async function getRoleMenuApi(parm){
  return await http.getRestApi("/role/menu",parm)
}
//分配权限保存
export async function editRoleMenuApi(parm){
  return await http.post("/role/menu",parm)
}
//获取角色权限列表
export async function getRoleMenuTreeApi(parm){
  return await http.getRestApi("/role/menu",parm)
}
